package org.jample.poi;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;

public class DataReader {

    public static void read(String url) {
        try {
            InputStreamReader isr = new InputStreamReader(new FileInputStream(url), "gbk");
            BufferedReader reader = new BufferedReader(isr);
            String line = reader.readLine();
            System.out.println(line);
            String[] array = line.split("\t");
            for(String str:array){
                System.out.println(str);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        DataReader reader = new DataReader();
        reader.read("src/main/resources/poi/data.xls");
    }

}
